package xyz.jcat.biz.admin;

import xyz.jcat.redis.IRedisKey;

import java.util.concurrent.TimeUnit;

public enum AdminRedisKey implements IRedisKey {

    PERMISSION_ROLES("permission");

    private String prefix;
    private long timeout;
    private TimeUnit timeUnit;

    AdminRedisKey(String prefix) {
        this.prefix = prefix;
    }

    AdminRedisKey(String prefix, long timeout) {
        this.prefix = prefix;
        this.timeout = timeout;
    }

    AdminRedisKey(String prefix, long timeout, TimeUnit timeUnit) {
        this.prefix = prefix;
        this.timeout = timeout;
        this.timeUnit = timeUnit;
    }

    @Override
    public String getPrefix() {
        return this.prefix;
    }

    @Override
    public long getTimeout() {
        return this.timeout;
    }

    @Override
    public TimeUnit getTimeUnit() {
        return this.timeUnit;
    }
}
